<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>21.优秀的日期处理库momentjs</title>
</head>

<body>
  <script src="http://cdn.staticfile.org/moment.js/2.24.0/moment.js"></script>

  <script>
    const date = moment('1992-2-22 10:12:24');
    console.log(date.format("YYYY-MM-DD HH:mm:ss dddd"));
    console.log(moment().format("LLLL"));
    //10天后的日期
    console.log(date.add(10,'days').format("YYYY-MM-DD HH:mm:ss"));
  </script>
</body>

</html>